<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use \App\Target;

class TargetController extends Controller
{
    public function index()
    {
        $targets = Target::orderBy('ranking', 'desc')->orderBy('created_at', 'desc')->paginate(10);
    	return view('index', compact('targets'));
    }

    public function create()
    {
        $targets = Target::orderBy('ranking', 'desc')->orderBy('created_at', 'desc')->paginate(10);
    	return view('create', compact('targets'));
    }

    public function edit()
    {
        $targets = Target::orderBy('ranking', 'desc')->orderBy('created_at', 'desc')->paginate(10);
    	return view('edit', compact('targets'));
    }
}
